{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "3f46935a",
   "metadata": {},
   "outputs": [],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "\n",
    "# 准备数据\n",
    "x = [1, 2, 3, 4, 5]\n",
    "y = [2, 3, 5, 7, 11]\n",
    "\n",
    "# 创建图形\n",
    "plt.plot(x, y)\n",
    "\n",
    "# 添加标题和标签\n",
    "plt.title(\"Simple Line Plot\")\n",
    "plt.xlabel(\"x-axis\")\n",
    "plt.ylabel(\"y-axis\")\n",
    "\n",
    "# 显示网格\n",
    "plt.grid(True)\n",
    "\n",
    "# 显示图形\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "45fddfd1",
   "metadata": {},
   "outputs": [],
   "source": [
    "plt.scatter(x, y)\n",
    "plt.title(\"Simple Scatter Plot\")\n",
    "plt.xlabel(\"x-axis\")\n",
    "plt.ylabel(\"y-axis\")\n",
    "plt.grid(True)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "7f338b7f",
   "metadata": {},
   "outputs": [],
   "source": [
    "plt.bar(x, y)\n",
    "plt.title(\"Simple Bar Chart\")\n",
    "plt.xlabel(\"x-axis\")\n",
    "plt.ylabel(\"y-axis\")\n",
    "plt.grid(axis='y')\n",
    "plt.show()"
   ]
  }
 ],
 "metadata": {
  "language_info": {
   "name": "python"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
